package game;

import com.sun.corba.se.impl.encoding.CodeSetConversion.BTCConverter;

public class records extends JFrameConFondo {

	public records() {
		initComponents();
	}

	//GEN-BEGIN:initComponents
	// <editor-fold defaultstate="collapsed" desc="Generated Code">
	private void initComponents() {

		jButton1 = new javax.swing.JButton();		
		jButton3 = new javax.swing.JButton();
		jButton4 = new javax.swing.JButton();
		jLabel1 = new javax.swing.JLabel();
		jLabel2 = new javax.swing.JLabel();
		jLabel3 = new javax.swing.JLabel();
		jLabel4 = new javax.swing.JLabel();
		jLabel5 = new javax.swing.JLabel();
		jLabel6 = new javax.swing.JLabel();
		jLabel7 = new javax.swing.JLabel();
		jLabel8 = new javax.swing.JLabel();
		jLabel9 = new javax.swing.JLabel();
		jLabel10 = new javax.swing.JLabel();
		jLabel11 = new javax.swing.JLabel();
		jLabel12 = new javax.swing.JLabel();
		jLabel13 = new javax.swing.JLabel();
		jLabel14 = new javax.swing.JLabel();
		jLabel15 = new javax.swing.JLabel();
		jLabel16 = new javax.swing.JLabel();
		jLabel17 = new javax.swing.JLabel();
		jLabel18 = new javax.swing.JLabel();
		jLabel19 = new javax.swing.JLabel();
		jLabel20 = new javax.swing.JLabel();

		setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
		setTitle("Bowling Net");
		setResizable(false);

		jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"imagenes/b1.png"))); // NOI18N
		jButton1.setBorder(null);
		jButton1.setBorderPainted(false);
		jButton1.setContentAreaFilled(false);
		jButton1.setPressedIcon(new javax.swing.ImageIcon(getClass()
				.getResource("imagenes/b1_3.png"))); // NOI18N
		jButton1.setRolloverIcon(new javax.swing.ImageIcon(getClass()
				.getResource("imagenes/b1_2.png"))); // NOI18N
		jButton1.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				jButton1ActionPerformed(evt);
			}
		});

		jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"imagenes/b2.png"))); // NOI18N
		jButton3.setBorder(null);
		jButton3.setContentAreaFilled(false);
		jButton3.setPressedIcon(new javax.swing.ImageIcon(getClass()
				.getResource("imagenes/b2_3.png"))); // NOI18N
		jButton3.setRolloverIcon(new javax.swing.ImageIcon(getClass()
				.getResource("imagenes/b2_2.png"))); // NOI18N
		jButton3.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				jButton3ActionPerformed(evt);
			}
		});

		jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"imagenes/b5.png"))); // NOI18N
		jButton4.setBorder(null);
		jButton4.setContentAreaFilled(false);
		jButton4.setPressedIcon(new javax.swing.ImageIcon(getClass()
				.getResource("imagenes/b5_2.png"))); // NOI18N
		jButton4.setRolloverIcon(new javax.swing.ImageIcon(getClass()
				.getResource("imagenes/b5_3.png"))); // NOI18N

		javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
				getContentPane());
		getContentPane().setLayout(layout);
		layout
				.setHorizontalGroup(layout
						.createParallelGroup(
								javax.swing.GroupLayout.Alignment.LEADING)
						.addGroup(
								layout
										.createSequentialGroup()
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.LEADING)
														.addGroup(
																layout
																		.createSequentialGroup()
																		.addGap(
																				39,
																				39,
																				39)
																		.addComponent(
																				jButton1))
														.addGroup(
																layout
																		.createSequentialGroup()
																		.addGap(
																				20,
																				20,
																				20)
																		.addGroup(
																				layout
																						.createParallelGroup(
																								javax.swing.GroupLayout.Alignment.LEADING)
																						.addComponent(
																								jButton3)
																						.addComponent(
																								jButton4))))
										.addContainerGap(643, Short.MAX_VALUE))
						.addGroup(
								javax.swing.GroupLayout.Alignment.TRAILING,
								layout
										.createSequentialGroup()
										.addContainerGap(338, Short.MAX_VALUE)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.LEADING,
																false)
														.addGroup(
																layout
																		.createSequentialGroup()
																		.addComponent(
																				jLabel10)
																		.addPreferredGap(
																				javax.swing.LayoutStyle.ComponentPlacement.RELATED,
																				javax.swing.GroupLayout.DEFAULT_SIZE,
																				Short.MAX_VALUE)
																		.addComponent(
																				jLabel20))
														.addGroup(
																layout
																		.createSequentialGroup()
																		.addGroup(
																				layout
																						.createParallelGroup(
																								javax.swing.GroupLayout.Alignment.TRAILING)
																						.addComponent(
																								jLabel2)
																						.addComponent(
																								jLabel1)
																						.addComponent(
																								jLabel3)
																						.addComponent(
																								jLabel4)
																						.addComponent(
																								jLabel5)
																						.addComponent(
																								jLabel6)
																						.addComponent(
																								jLabel7)
																						.addComponent(
																								jLabel8)
																						.addComponent(
																								jLabel9))
																		.addGap(
																				117,
																				117,
																				117)
																		.addGroup(
																				layout
																						.createParallelGroup(
																								javax.swing.GroupLayout.Alignment.TRAILING)
																						.addComponent(
																								jLabel11)
																						.addComponent(
																								jLabel12)
																						.addComponent(
																								jLabel13)
																						.addComponent(
																								jLabel14)
																						.addComponent(
																								jLabel15)
																						.addComponent(
																								jLabel16)
																						.addComponent(
																								jLabel17)
																						.addComponent(
																								jLabel18)
																						.addComponent(
																								jLabel19))))
										.addGap(249, 249, 249)));
		layout
				.setVerticalGroup(layout
						.createParallelGroup(
								javax.swing.GroupLayout.Alignment.LEADING)
						.addGroup(
								javax.swing.GroupLayout.Alignment.TRAILING,
								layout
										.createSequentialGroup()
										.addContainerGap(199, Short.MAX_VALUE)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.BASELINE)
														.addComponent(jLabel1)
														.addComponent(jLabel11))
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.RELATED)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.BASELINE)
														.addComponent(jLabel2)
														.addComponent(jLabel12))
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.RELATED)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.BASELINE)
														.addComponent(jLabel3)
														.addComponent(jLabel13))
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.RELATED)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.BASELINE)
														.addComponent(jLabel4)
														.addComponent(jLabel14))
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.RELATED)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.BASELINE)
														.addComponent(jLabel5)
														.addComponent(jLabel15))
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.RELATED)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.BASELINE)
														.addComponent(jLabel6)
														.addComponent(jLabel16))
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.RELATED)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.BASELINE)
														.addComponent(jLabel7)
														.addComponent(jLabel17))
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.RELATED)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.BASELINE)
														.addComponent(jLabel8)
														.addComponent(jLabel18))
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.RELATED)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.BASELINE)
														.addComponent(jLabel9)
														.addComponent(jLabel19))
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.RELATED)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.BASELINE)
														.addComponent(jLabel10)
														.addComponent(jLabel20))
										.addGap(18, 18, 18)
										.addComponent(
												jButton1,
												javax.swing.GroupLayout.PREFERRED_SIZE,
												13,
												javax.swing.GroupLayout.PREFERRED_SIZE)
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.RELATED)
										.addComponent(
												jButton3,
												javax.swing.GroupLayout.PREFERRED_SIZE,
												15,
												javax.swing.GroupLayout.PREFERRED_SIZE)
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.RELATED)
										.addComponent(
												jButton4,
												javax.swing.GroupLayout.PREFERRED_SIZE,
												13,
												javax.swing.GroupLayout.PREFERRED_SIZE)
										.addGap(69, 69, 69)));

		personajes p;
		jButton4.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				jButton4ActionPerformed(evt);
			}
		});

		java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit()
				.getScreenSize();
		setBounds((screenSize.width - 800) / 2, (screenSize.height - 600) / 2,
				800, 600);
	}// </editor-fold>
	//GEN-END:initComponents

	private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
		i= new instrucciones();
		this.dispose();
		i.mostrarInstrucciones();
	}

	private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
		p = new personajes();
		this.dispose();
		p.seleccionPersonaje();
	}

	public static void mostrarRecords(final String mensaje) {
		java.awt.EventQueue.invokeLater(new Runnable() {
			public void run() {
				mensajeRecibido=mensaje;
				
				JFrameConFondo jf = new records();
				//jf.setLocationRelativeTo(null);
				jf.setImagen("imagenes/records.png");
				jf.setVisible(true);

				jLabel1.setText(mensajeRecibido.split(",")[0]);
				jLabel2.setText(mensajeRecibido.split(",")[1]);
				jLabel3.setText(mensajeRecibido.split(",")[2]);
				jLabel4.setText(mensajeRecibido.split(",")[3]);
				jLabel5.setText(mensajeRecibido.split(",")[4]);
				jLabel6.setText(mensajeRecibido.split(",")[5]);
				jLabel7.setText(mensajeRecibido.split(",")[6]);
				jLabel8.setText(mensajeRecibido.split(",")[7]);
				jLabel9.setText(mensajeRecibido.split(",")[8]);
				jLabel10.setText(mensajeRecibido.split(",")[9]);
				jLabel11.setText(mensajeRecibido.split(",")[10]);
				jLabel12.setText(mensajeRecibido.split(",")[11]);
				jLabel13.setText(mensajeRecibido.split(",")[12]);
				jLabel14.setText(mensajeRecibido.split(",")[13]);
				jLabel15.setText(mensajeRecibido.split(",")[14]);
				jLabel16.setText(mensajeRecibido.split(",")[15]);
				jLabel17.setText(mensajeRecibido.split(",")[16]);
				jLabel18.setText(mensajeRecibido.split(",")[17]);
				jLabel19.setText(mensajeRecibido.split(",")[18]);
				jLabel20.setText(mensajeRecibido.split(",")[19]);
			}
		});
	}

	//GEN-BEGIN:variables
	// Variables declaration - do not modify
	private javax.swing.JButton jButton1;
	private javax.swing.JButton jButton3;
	private javax.swing.JButton jButton4;

	private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
		c = new configuracion();
		this.dispose();
		c.configurarServidor();
	}

	configuracion c;
	personajes p;
	instrucciones i;
	static String mensajeRecibido="";
	private static javax.swing.JLabel jLabel1;
	private static javax.swing.JLabel jLabel10;
	private static javax.swing.JLabel jLabel11;
	private static javax.swing.JLabel jLabel12;
	private static javax.swing.JLabel jLabel13;
	private static javax.swing.JLabel jLabel14;
	private static javax.swing.JLabel jLabel15;
	private static javax.swing.JLabel jLabel16;
	private static javax.swing.JLabel jLabel17;
	private static javax.swing.JLabel jLabel18;
	private static javax.swing.JLabel jLabel19;
	private static javax.swing.JLabel jLabel2;
	private static javax.swing.JLabel jLabel20;
	private static javax.swing.JLabel jLabel3;
	private static javax.swing.JLabel jLabel4;
	private static javax.swing.JLabel jLabel5;
	private static javax.swing.JLabel jLabel6;
	private static javax.swing.JLabel jLabel7;
	private static javax.swing.JLabel jLabel8;
	private static javax.swing.JLabel jLabel9;
}

